package frame.networks;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import javax.swing.JSplitPane;

import frame.MopraFrame;
import frame.networks.tables.NetworksTableTabbedPane;
import frame.networks.viewers.VirtualNetworksVisualizationViewersTabbedPane;
import frame.networks.viewers.PhysicalNetworksVisualizationViewersTabbedPane;

@SuppressWarnings("serial")
public class NetworksPanel extends JPanel
{
	private NetworksTableTabbedPane networksTableTabbedPane;
	public NetworksTableTabbedPane getNetworksTablesTabbedPane(){ return networksTableTabbedPane; }
	public void setNetworksTableTabbedPane( NetworksTableTabbedPane networksTableTabbedPane ){ this.networksTableTabbedPane = networksTableTabbedPane; }
	
	private PhysicalNetworksVisualizationViewersTabbedPane physicalNetworksVisualizationViewersTabbedPane;
	public PhysicalNetworksVisualizationViewersTabbedPane getPhysicalNetworksVisualizationViewersTabbedPane(){ return physicalNetworksVisualizationViewersTabbedPane; }
	public void setPhysicalNetworksVisualizationViewersTabbedPane( PhysicalNetworksVisualizationViewersTabbedPane physicalNetworksVisualizationViewersTabbedPane ){ this.physicalNetworksVisualizationViewersTabbedPane = physicalNetworksVisualizationViewersTabbedPane; }
	
	private VirtualNetworksVisualizationViewersTabbedPane virtualNetworksVisualizationViewersTabbedPane;
	public VirtualNetworksVisualizationViewersTabbedPane getVirtualNetworksVisualizationViewersTabbedPane(){ return virtualNetworksVisualizationViewersTabbedPane; }
	public void setVirtualNetworksVisualizationViewersTabbedPane( VirtualNetworksVisualizationViewersTabbedPane virtualNetworksVisualizationViewersTabbedPane ){ this.virtualNetworksVisualizationViewersTabbedPane = virtualNetworksVisualizationViewersTabbedPane; }
	
	private JSplitPane splitPane;
	public JSplitPane getSplitPane(){ return splitPane; }
	public void setSplitPane( JSplitPane splitPane ){ this.splitPane = splitPane; }
	
	public NetworksPanel( MopraFrame mopraFrame )
	{	
		this.setNetworksTableTabbedPane( new NetworksTableTabbedPane( mopraFrame.getSimulator().getPhysicalNetworks(), mopraFrame.getSimulator().getVirtualNetworks(), mopraFrame ) );
		
		this.setPhysicalNetworksVisualizationViewersTabbedPane( new PhysicalNetworksVisualizationViewersTabbedPane( mopraFrame ) );
		this.setVirtualNetworksVisualizationViewersTabbedPane( new VirtualNetworksVisualizationViewersTabbedPane( mopraFrame ) );
		
		this.setSplitPane( new JSplitPane() );
		this.getSplitPane().setLeftComponent( this.getNetworksTablesTabbedPane() );
		this.getSplitPane().setRightComponent( this.getPhysicalNetworksVisualizationViewersTabbedPane() );
		
		this.setLayout( new BorderLayout() );
		this.add( this.getSplitPane(), BorderLayout.CENTER );
	}
	
}
